package com.jxsd.edu.cn.struts2.intercept;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class LoginInterCepter   extends  AbstractInterceptor  
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public String intercept(ActionInvocation invocation) throws Exception
	{
		if(ActionContext.getContext().getSession().get("cityName")==null)
		{
			return  "login_input";
		}
		return invocation.invoke();
	}

}
